<%--
  Created by IntelliJ IDEA.
  User: Sssller
  Date: 2021/1/28
  Time: 17:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Title</title>
    <!-- Bootstrap -->
    <link href="${pageContext.request.contextPath}/static/boostrap/css/bootstrap.css" rel="stylesheet">

    <style>
        body{
            font-size: 18px;
        }
    </style>
</head>

<body>
<div class="container-fluid">
    <ol class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li class="active">PmsProduct</li>
    </ol>

    <div class="panel  panel-info">
        <div class="panel-heading">
            条件查询
        </div>
        <div class="panel-body">
            <form class="form-inline" action="${pageContext.request.contextPath}/PmsProduct/search" method="post">
                <div  class="form-group">
                <label>名称:</label>
                <input type="text" name="name" id="name" class="form-control">
                </div>
                <div  class="form-group">
                <label>货号:</label>
                <input type="text" name="productSn" id="productSn" class="form-control">
                </div>
                <div  class="form-group">
                <label> 状态</label>
                <input type="radio" name="deleteStatus" value="0" class="form-control">下架
                <input type="radio" name="deleteStatus" value="1" class="form-control">上架
                </div>
                <input type="submit" value="搜索" class="btn btn-primary" />
            </form>
        </div>
    </div>


    <table class="table    table-bordered  table-hover">
        <tr>
            <td>编号</td>
            <td>名称</td>
            <td>图片</td>
            <td>货号</td>
            <td>是否新品</td>
            <td>是否推荐</td>
            <td>库存</td>
            <td>价格</td>
        </tr>
        <c:forEach items="${id}" var="p">
            <tr>
                <td>${p.id}</td>
                <td>${p.name}</td>
                <td>${p.pic}</td>
                <td>${p.productSn}</td>
                <td>
                    <c:if test="${p.newStatus==0}">不是新品</c:if>
                    <c:if test="${p.newStatus==0}">新品</c:if>
                </td>
                <td>
                    <c:if test="${p.recommandStatus==0}">不推荐</c:if>
                    <c:if test="${p.recommandStatus==1}">推荐</c:if>
                </td>
                <td>${p.stock}</td>
                <td>${p.price}</td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>

<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/static/boostrap/js/bootstrap.js"></script>
</html>
